package edu.sctu.yueding.utils;


import java.util.Comparator;

import edu.sctu.yueding.bean.FriendBean;


public class PinyinComparator implements Comparator<FriendBean> {

	@Override
	public int compare(FriendBean o1, FriendBean o2) {
		if (o1.getSortLetters().equals("☆")) {
			return -1;
		} else if (o2.getSortLetters().equals("☆")) {
			return 1;
		} else if (o1.getSortLetters().equals("#")) {
			return -1;
		} else if (o2.getSortLetters().equals("#")) {
			return 1;
		} else {
			return o1.getSortLetters().compareTo(o2.getSortLetters());
		}
	}

}
